package com.example.module_home;

import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.example.module_base_core.RouteUtils.HomeModuleRoute;
import com.example.module_base_core.baseview.BaseActivity;
import com.example.module_base_core.uiuitls.ToastUtil;
import com.example.module_home.databinding.ActivityHomeTestBinding;
import com.harisucici.jetpackbase.base.HBaseActivity;

/**
 * @Author : 作者
 * @Time : On 2020/12/2 15:56
 * @Page: On com.example.module_home
 * @Description : HomeTestActivity
 */
@Route(path = HomeModuleRoute.Home_Activity_test)

public class HomeTestActivity extends BaseActivity<ActivityHomeTestBinding, HomeMode> {


    @Override
    public void initData(View v) {
        super.initData(v);
        binding.setEvent(new Event());
    }

    @Override
    protected boolean exit() {
        return false;
    }

    @Override
    public void onMultiClick(View v) {

    }

    @Override
    public int initCView(Bundle savedInstanceState) {
        return R.layout.activity_home_test;
    }

    @Override
    public int initVM() {
        return BR.homemode;
    }

    public class Event {

        public void toastUp() {
            ToastUtil.showToastTop("上部");
        }

        public void toastCentre() {
            ToastUtil.showToastCenter("中部");

        }

        public void toastBelow() {
            ToastUtil.showToast("默认");

        }

        public void toastImage() {
            ToastUtil.showToastWithImg("测试图片", R.drawable.ic_success);
        }
    }
}
